package com.jcn.seckill.access;

import com.jcn.seckill.domain.MiaoshaUser;
//用户保存
public class UserContext {
	//线程绑定
	private static ThreadLocal<MiaoshaUser> userHolder = new ThreadLocal<MiaoshaUser>();
	
	public static void setUser(MiaoshaUser user) {
		userHolder.set(user);
	}
	
	public static MiaoshaUser getUser() {
		return userHolder.get();
	}

}
